package com.qujia.station.domain;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 实体卡充值/消费记录
 * */
public class PhysicalCardBalance implements Serializable {

    /**实体卡充值/消费记录id */
    @ApiModelProperty(value = "实体卡充值/消费记录id")
    private Long id;

    /**订单号 */
    @ApiModelProperty(value = "订单号")
    private String balanceNo;

    /**实体卡号 */
    @ApiModelProperty(value = "实体卡号")
    private String physicalCardNo;

    /**充值/消费金额 */
    @ApiModelProperty(value = "充值/消费金额")
    private BigDecimal amount;

    /**充值/消费后余额 */
    @ApiModelProperty(value = "充值/消费后余额")
    private BigDecimal balanceAmount;

    /**订单类型：cz:储值卡充值; xf:储值卡消费；dcz:定额卡充值；dxf:定额卡消费 */
    @ApiModelProperty(value = "订单类型：cz:储值卡充值; xf:储值卡消费；dcz:定额卡充值；dxf:定额卡消费")
    private String balanceType;

    /**油企id */
    @ApiModelProperty(value = "油企id")
    private Long enterpriseId;

    /**油企名称 */
    @ApiModelProperty(value = "油企名称")
    private String enterpriseName;

    /**油站id */
    @ApiModelProperty(value = "油站id")
    private String stationId;

    /**油站名称 */
    @ApiModelProperty(value = "油站名称")
    private String stationName;

    /**是否充值/消费成功：0，未成功；1，成功 */
    @ApiModelProperty(value = "是否充值/消费成功：0，未成功；1，成功")
    private String status;

    /**充值/消费时间 */
    @ApiModelProperty(value = "充值/消费时间")
    private Date createTime;

    /**消费订单是否删除 */
    @ApiModelProperty(value = "订单是否删除 0 表示未删除，1 表示已删除")
    private String isDeleted;

    /**
     * 充值/消费类型，xj:现金，pos:聚合支付，bka:后台增加，czkxf:实体-储值卡消费，dekxf:实体-定额卡消费，ref:充值退款
     */
    private String payment;

    /**
     * 实体卡移动消费订单退款状态，1 未退款，2 退款中，3：退款成功，4：退款失败
     */
    private String refundStatus;

    /**
     * 支付方式id
     */
    private Long payWayId;

    /**
     * 交易单号（微信）注:云化支付存的是云化流水号
     */
    private String transactionId;

    /**
     * 商户单号（商户）注:云化支付存的是云化订单号
     */
    private String merchantsNumber;

    /**
     * 渠道费
     */
    private BigDecimal serviceCharge;

    //开票状态
    private int invoiceStatus;

    @ApiModelProperty(value = "充值立减金额")
    private BigDecimal rechargeDiscount;

    @ApiModelProperty(value = "消费立减金额")
    private BigDecimal consumptionDiscount;

    public int getInvoiceStatus() {
        return invoiceStatus;
    }

    public void setInvoiceStatus(int invoiceStatus) {
        this.invoiceStatus = invoiceStatus;
    }

    /**
     * 加油员
     */
    private Integer operator;

    private static final long serialVersionUID = 1L;

    public PhysicalCardBalance(Long id, String balanceNo, String physicalCardNo, BigDecimal amount, BigDecimal balanceAmount, String balanceType, Long enterpriseId, String enterpriseName, String stationId, String stationName, String status, Date createTime, String isDeleted, BigDecimal rechargeDiscount,BigDecimal consumptionDiscount) {
        this.id = id;
        this.balanceNo = balanceNo;
        this.physicalCardNo = physicalCardNo;
        this.amount = amount;
        this.balanceAmount = balanceAmount;
        this.balanceType = balanceType;
        this.enterpriseId = enterpriseId;
        this.enterpriseName = enterpriseName;
        this.stationId = stationId;
        this.stationName = stationName;
        this.status = status;
        this.createTime = createTime;
        this.isDeleted = isDeleted;
        this.rechargeDiscount = rechargeDiscount;
        this.consumptionDiscount = consumptionDiscount;
    }

    public PhysicalCardBalance() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBalanceNo() {
        return balanceNo;
    }

    public void setBalanceNo(String balanceNo) {
        this.balanceNo = balanceNo;
    }

    public String getPhysicalCardNo() {
        return physicalCardNo;
    }

    public void setPhysicalCardNo(String physicalCardNo) {
        this.physicalCardNo = physicalCardNo;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getBalanceAmount() {
        return balanceAmount;
    }

    public void setBalanceAmount(BigDecimal balanceAmount) {
        this.balanceAmount = balanceAmount;
    }

    public String getBalanceType() {
        return balanceType;
    }

    public void setBalanceType(String balanceType) {
        this.balanceType = balanceType;
    }

    public Long getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(Long enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(String isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getPayment() {
        return payment;
    }

    public void setPayment(String payment) {
        this.payment = payment;
    }

    public String getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(String refundStatus) {
        this.refundStatus = refundStatus;
    }

    public Long getPayWayId() {
        return payWayId;
    }

    public void setPayWayId(Long payWayId) {
        this.payWayId = payWayId;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getMerchantsNumber() {
        return merchantsNumber;
    }

    public void setMerchantsNumber(String merchantsNumber) {
        this.merchantsNumber = merchantsNumber;
    }

    public BigDecimal getServiceCharge() {
        return serviceCharge;
    }

    public void setServiceCharge(BigDecimal serviceCharge) {
        this.serviceCharge = serviceCharge;
    }

    public Integer getOperator() {
        return operator;
    }

    public void setOperator(Integer operator) {
        this.operator = operator;
    }

    public BigDecimal getRechargeDiscount() {
        return rechargeDiscount;
    }

    public void setRechargeDiscount(BigDecimal rechargeDiscount) {
        this.rechargeDiscount = rechargeDiscount;
    }

    public BigDecimal getConsumptionDiscount() {
        return consumptionDiscount;
    }

    public void setConsumptionDiscount(BigDecimal consumptionDiscount) {
        this.consumptionDiscount = consumptionDiscount;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PhysicalCardBalance other = (PhysicalCardBalance) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBalanceNo() == null ? other.getBalanceNo() == null : this.getBalanceNo().equals(other.getBalanceNo()))
            && (this.getPhysicalCardNo() == null ? other.getPhysicalCardNo() == null : this.getPhysicalCardNo().equals(other.getPhysicalCardNo()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getBalanceAmount() == null ? other.getBalanceAmount() == null : this.getBalanceAmount().equals(other.getBalanceAmount()))
            && (this.getBalanceType() == null ? other.getBalanceType() == null : this.getBalanceType().equals(other.getBalanceType()))
            && (this.getEnterpriseId() == null ? other.getEnterpriseId() == null : this.getEnterpriseId().equals(other.getEnterpriseId()))
            && (this.getEnterpriseName() == null ? other.getEnterpriseName() == null : this.getEnterpriseName().equals(other.getEnterpriseName()))
            && (this.getStationId() == null ? other.getStationId() == null : this.getStationId().equals(other.getStationId()))
            && (this.getStationName() == null ? other.getStationName() == null : this.getStationName().equals(other.getStationName()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getRechargeDiscount() == null ? other.getRechargeDiscount() == null : this.getRechargeDiscount().equals(other.getRechargeDiscount()))
            && (this.getConsumptionDiscount() == null ? other.getConsumptionDiscount() == null : this.getConsumptionDiscount().equals(other.getConsumptionDiscount()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBalanceNo() == null) ? 0 : getBalanceNo().hashCode());
        result = prime * result + ((getPhysicalCardNo() == null) ? 0 : getPhysicalCardNo().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getBalanceAmount() == null) ? 0 : getBalanceAmount().hashCode());
        result = prime * result + ((getBalanceType() == null) ? 0 : getBalanceType().hashCode());
        result = prime * result + ((getEnterpriseId() == null) ? 0 : getEnterpriseId().hashCode());
        result = prime * result + ((getEnterpriseName() == null) ? 0 : getEnterpriseName().hashCode());
        result = prime * result + ((getStationId() == null) ? 0 : getStationId().hashCode());
        result = prime * result + ((getStationName() == null) ? 0 : getStationName().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getRechargeDiscount() == null) ? 0 : getRechargeDiscount().hashCode());
        result = prime * result + ((getConsumptionDiscount() == null) ? 0 : getConsumptionDiscount().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", balanceNo=").append(balanceNo);
        sb.append(", physicalCardNo=").append(physicalCardNo);
        sb.append(", amount=").append(amount);
        sb.append(", balanceAmount=").append(balanceAmount);
        sb.append(", balanceType=").append(balanceType);
        sb.append(", enterpriseId=").append(enterpriseId);
        sb.append(", enterpriseName=").append(enterpriseName);
        sb.append(", stationId=").append(stationId);
        sb.append(", stationName=").append(stationName);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", isDeleted=").append(rechargeDiscount);
        sb.append(", isDeleted=").append(consumptionDiscount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}